#include "car_ownership.hpp"
#include "file_list.hpp"

car_ownership_struct_csv const car_ownership_csv::find(int _id)
{
		csv_struct csv_file(file_list::car_ownership_filename());

		while(_id && !csv_file.eof())
		{
			++csv_file;
			car_ownership_struct_csv row(csv_file.get_line());

			if(row.id() == _id)
			{
				return row;				 
			}
		}

		car_ownership_struct_csv car_ownership_struct_csv_null;
		return car_ownership_struct_csv_null;
}